package com.ruoyi.yyq.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.yyq.api.domain.CarRepairReservation;
import com.ruoyi.yyq.api.factory.RemoteCarRepairReservationFallbackFactory;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteCarRepairReservationService", value = ServiceNameConstants.YYQ_SERVICE, fallbackFactory = RemoteCarRepairReservationFallbackFactory.class)
public interface RemoteCarRepairReservationService {
	/**
	 * 查询维修预约列表
	 */

	@GetMapping("/reservation/getlist")
	public TableDataInfo getlist(@RequestHeader(SecurityConstants.INNER) String source,CarRepairReservation carRepairReservation);
	/**
	 * 新增维修预约
	 */

	@PostMapping("/reservation/getAdd")
	public AjaxResult getAdd(@RequestHeader(SecurityConstants.INNER) String source,@RequestBody CarRepairReservation carRepairReservation);

	/**
	 * 修改维修预约
	 */

	@PutMapping("/reservation/getEdit")
	public AjaxResult getEdit(@RequestHeader(SecurityConstants.INNER) String source,@RequestBody CarRepairReservation carRepairReservation);

	/**
	 * 删除维修预约
	 */

	@DeleteMapping("/reservation/getRemove/{ids}")
	public AjaxResult getRemove(@RequestHeader(SecurityConstants.INNER) String source,@PathVariable Long[] ids);
}
